<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Vision plugin - special sensors</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../index.html" TARGET="_top"><img src="images/homeImg.png"></a></p>



<h1>Vision Plugin - Special Sensors</h1>

<p>The <a href="https://github.com/CoppeliaRobotics/simExtVision" target="_blank">vision plugin</a> hosts, among others, functions to handle a range of special type of sensors:</p>


<h3 class=subsectionBarTab><a name="simVision.createVelodyneHDL64E" id="simVision.createVelodyneHDL64E"></a>simVision.createVelodyneHDL64E</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Creates a handle for generating data similar to a Velodyne HDL64E. See also <a href="#simVision.destroyVelodyneHDL64E">simVision.destroyVelodyneHDL64E</a> and <a href="#simVision.handleVelodyneHDL64E">simVision.handleVelodyneHDL64E</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number handle=simVision.createVelodyneHDL64E(table_4 visionSensorHandles,number frequency,number options=0,number pointSize=2,table_2 coloring_closeFarDist={1,5},number displayScalingFactor=1,number pointCloudHandle=-1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>rgbVisionSensorHandle</strong>: handle of a passive vision sensor, receiving the computed RGB image.</div>
<div><strong>visionSensorHandles</strong>: the handles of 4 active vision sensors, looking to the front, left, rear and right.</div>
<div><strong>frequency</strong>: the rotation frequency.</div>
<div><strong>options</strong>: bit-coded options:</div>
<div class=tab>bit0 set (i.e. 1): do not display points</div>
<div class=tab>bit1 set( i.e. 2): display only current points.</div>
<div class=tab>bit2 set( i.e. 4): returned data is polar (otherwise cartesian).</div>
<div class=tab>bit3 set( i.e. 8): displayed points are emissive.</div>
<div><strong>pointSize</strong>: the size of the displayed points, in pixels.</div>
<div><strong>coloring_closeFarDist</strong>: the close and far distances, used to adjust intensity coloring.</div>
<div><strong>displayScalingFactor</strong>: a scaling factor applied radially to each point. Can be used to bring points slightly closer to the sensor, to avoid points being hidden behind surfaces due to depth map resolution.</div>
<div><strong>pointCloudHandle</strong>: the optional handle of a point cloud object (that will be in charge of displaying the detected points.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>handle</strong>: the created Velodyne HDL64E handle.</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.createVelodyneVPL16" id="simVision.createVelodyneVPL16"></a>simVision.createVelodyneVPL16</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Creates a handle for generating data similar to a Velodyne VPL16. See also <a href="#simVision.destroyVelodyneVPL16">simVision.destroyVelodyneVPL16</a> and <a href="#simVision.handleVelodyneVPL16">simVision.handleVelodyneVPL16</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number handle=simVision.createVelodyneVPL16(table_4 visionSensorHandles,number frequency,number options=0,number pointSize=2,table_2 coloring_closeFarDist={1,5},number displayScalingFactor=1,number pointCloudHandle=-1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>rgbVisionSensorHandle</strong>: handle of a passive vision sensor, receiving the computed RGB image.</div>
<div><strong>visionSensorHandles</strong>: the handles of 4 active vision sensors, looking to the front, left, rear and right.</div>
<div><strong>frequency</strong>: the rotation frequency.</div>
<div><strong>options</strong>: bit-coded options:</div>
<div class=tab>bit0 set (i.e. 1): do not display points</div>
<div class=tab>bit1 set( i.e. 2): display only current points.</div>
<div class=tab>bit2 set( i.e. 4): returned data is polar (otherwise cartesian).</div>
<div class=tab>bit3 set( i.e. 8): displayed points are emissive.</div>
<div><strong>pointSize</strong>: the size of the displayed points, in pixels.</div>
<div><strong>coloring_closeFarDist</strong>: the close and far distances, used to adjust intensity coloring.</div>
<div><strong>displayScalingFactor</strong>: a scaling factor applied radially to each point. Can be used to bring points slightly closer to the sensor, to avoid points being hidden behind surfaces due to depth map resolution.</div>
<div><strong>pointCloudHandle</strong>: the optional handle of a point cloud object (that will be in charge of displaying the detected points.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>handle</strong>: the created Velodyne VPL16 handle.</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.destroyVelodyneHDL64E" id="simVision.destroyVelodyneHDL64E"></a>simVision.destroyVelodyneHDL64E</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Deletes a Velodyne HDL64E handle previously created with <a href="#simVision.createVelodyneHDL64E">simVision.createVelodyneHDL64E</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.destroyVelodyneHDL64E(number velodyneHandle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>velodyneHandle</strong>: a handle previously returned by <a href="#simVision.createVelodyneHDL64E">simVision.createVelodyneHDL64E</a>.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.destroyVelodyneVPL16" id="simVision.destroyVelodyneVPL16"></a>simVision.destroyVelodyneVPL16</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Deletes a Velodyne VPL16 handle previously created with <a href="#simVision.createVelodyneVPL16">simVision.createVelodyneVPL16</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.destroyVelodyneVPL16(number velodyneHandle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>velodyneHandle</strong>: a handle previously returned by <a href="#simVision.createVelodyneVPL16">simVision.createVelodyneVPL16</a>.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.handleAnaglyphStereo" id="simVision.handleAnaglyphStereo"></a>simVision.handleAnaglyphStereo</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Allows to generate an anaglyph stereo image from two individual vision sensors (for the left and right eye).</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.handleAnaglyphStereo(number rgbVisionSensorHandle,table_2 handlesOfTwoVisionSensors,table_6 leftAndRightColors=nil)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>rgbVisionSensorHandle</strong>: handle of a passive vision sensor, receiving the computed RGB image.</div>
<div><strong>handlesOfTwoVisionSensors</strong>: the handles of two active vision sensors (for the left and right eye).</div>
<div><strong>leftAndRightColors</strong>: the colors for the left and right eye rendering.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.handleSpherical" id="simVision.handleSpherical"></a>simVision.handleSpherical</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Allows to generate an RGB and/or depth image that covers all directions, i.e. spherical vision, based on the input of 6 individual vision sensors, each looking into a different and perpendicular direction.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.handleSpherical(number rgbVisionSensorHandle,table_6 handlesOfSixVisionSensors,number horizontalAngle,number verticalAngle,number depthVisionSensorHandle=-1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>rgbVisionSensorHandle</strong>: handle of a passive vision sensor, receiving the computed RGB spherical image.</div>
<div><strong>handlesOfSixVisionSensors</strong>: the handles of 6 mutually perpendicular, looking into a different direction active vision sensors.</div>
<div><strong>horizontalAngle</strong>: the desired horizontal view angle, in radians (e.g. 2*math.pi).</div>
<div><strong>horizontalAngle</strong>: the desired vertical view angle, in radians (e.g. math.pi).</div>
<div><strong>depthVisionSensorHandle</strong>: handle of a passive vision sensor, receiving the computed depth image representation of the spherical depth map.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.handleVelodyneHDL64E" id="simVision.handleVelodyneHDL64E"></a>simVision.handleVelodyneHDL64E</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Handles a velodyne HDL64E sensor (i.e. generates and displays detection points. See also <a href="#simVision.createVelodyneHDL64E">simVision.createVelodyneHDL64E</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table points=simVision.handleVelodyneHDL64E(number velodyneHandle,number dt)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>velodyneHandle</strong>: a handle previously returned by <a href="#simVision.createVelodyneHDL64E">simVision.createVelodyneHDL64E</a>. Can be combined with sim.handleflag_abscoords to retrieve points relative to the absolute reference frame, instead of the reference frame of the sensor. Can also be combined with sim.handleflag_codedstring, in order to retrieve packed data (faster).</div>
<div><strong>dt</strong>: the time duration since last call to this function. Typically the simulation time step.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>points</strong>: a table containing the detected points, or a coded string.</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.handleVelodyneVPL16" id="simVision.handleVelodyneVPL16"></a>simVision.handleVelodyneVPL16</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Handles a velodyne VPL16 sensor (i.e. generates and displays detection points. See also <a href="#simVision.createVelodyneVPL16">simVision.createVelodyneVPL16</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table points=simVision.V(number velodyneHandle,number dt)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>velodyneHandle</strong>: a handle previously returned by <a href="#simVision.createVelodyneVPL16">simVision.createVelodyneVPL16</a>. Can be combined with sim.handleflag_abscoords to retrieve points relative to the absolute reference frame, instead of the reference frame of the sensor. Can also be combined with sim.handleflag_codedstring, in order to retrieve packed data (faster).</div>
<div><strong>dt</strong>: the time duration since last call to this function. Typically the simulation time step.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>points</strong>: a table containing the detected points, or a coded string.</div></td> 
</tr> 
</table> 
<br>






<br>
 </tr>
</table> 
</div>  
  
  
</body>

</html>